﻿import java.util.ArrayList;


public class PrintUtil {
	public static void print(ArrayList<Student> studentList) {
		if(studentList == null || studentList.size() == 0) {
			System.out.println("学生列表为空");
			return;
		}
		
        System.out.print("ID     姓名       年龄         班级名称       所属学院      年级       班级人数         专业       性别\n");
        
        for(int i=0; i<studentList.size(); i++) {
        	Student student = studentList.get(i);        	
        	// 输出每一个数据
            System.out.print(student.getId() + "    ");
            System.out.print(student.getName() + "    ");
            System.out.print(student.getAge() + "    ");
            System.out.print(student.getBjmc()+"      ");
            System.out.print(student.getSsxy() + "       ");
            System.out.print(student.getNj()+"      ");
            System.out.print(student.getBjrs()+"       ");
            System.out.print(student.getZy()+"      ");
            System.out.print(student.getSex());
            System.out.print("\n");
        }	
      }
	public static void print1(ArrayList<Course> courseList) {
		if(courseList == null || courseList.size() == 0) {
			System.out.println("学生列表为空");
			return;
		}
		
        System.out.print("ID      课程名            老师         专业         成绩      开课学期\n");
        
        for(int i=0; i<courseList.size(); i++) {
        	Course course = courseList.get(i);        	
        	// 输出每一个数据
            System.out.print(course.getId() + "      ");
            System.out.print(course.getKcm() + "     ");
            System.out.print(course.getLs() + "      ");
            System.out.print(course.getZy() + "      ");
            System.out.print(course.getCj() + "     ");
            System.out.print(course.getKkxq());
            System.out.print("\n");
        }	
      }
	
	
	public static void printMenu(String[] args) {
		System.out.println("************************");
		System.out.println("**** 请输入选择的序号     **");
		System.out.println("******  1 查看学生列表    **");
		System.out.println("******  2 查看课程列表    **");
		System.out.println("******  3 添加学生              **");
		System.out.println("******  4 删除学生              **");
		System.out.println("******  5             **");
		System.out.println("************************");		
		}
	
	}



